<%-- 
    Document   : adminuser
    Created on : 9 mai 2011, 22:54:15
    Author     : Mami
--%>

<%@page import="ecom.beans.entity.Clients"%>
<%@page import="java.util.ArrayList"%>
<%@page import="ecom.beans.entity.Productstore"%>
<%@page import="ecom.beans.entity.Produits"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="style.css" rel="stylesheet" type="text/css" />
        <title>Admin Page</title>
    </head>
    <body>
<div id="header_wrapper">
  <div id="header">


        <div id="site_title">
      <h1><img src="/Ecom-war/images/logo.png" alt="" /></h1>

        </div>
      <div id="firstconnex">
          <table>
              <tr>
                  <td style="visibility:hidden"></td>
                  <td style="visibility:hidden"></td>
                  <td style="visibility:hidden"></td>
                  <td style="visibility:hidden"></td>
                  <td style="visibility:hidden"></td>
                  <td>1�re visite</td>

                  <td>Mon Compte</td>


              </tr>
          </table>

      </div>

    <div id="menu">
      <ul>
        <li><a href="#" class="current">Accueil</a></li>
        <li><a href="#">Magasin GRENNYMIAGE</a></li>
        <li><a href="#">Produit BIO</a></li>
        <li><a href="#">Actualit�s</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </div>

       </div>
</div>
<!-- Title -->
<div id="content_wrapper">
<form  action="" enctype="application/x-www-form-urlencoded" method="post" OnSubmit="CheckRegistrationForm()">
    <% if (request.getAttribute("listeclients") != null) {
                                ArrayList<Clients> listclients = (ArrayList<Clients>) request.getAttribute("listeclients");
                                out.println("<table>");
                                out.println("<thead>La liste des clients</thead>");
                                out.println("<tr>");
                                out.println("<th>");
                                out.println("Numéro du client");
                                out.println("</th>");
                                out.println("<th>");
                                out.println("Prénom");
                                out.println("</th>");
                                out.println("<th>");
                                out.println("Nom");
                                out.println("</th>");
                                out.println("<th>");
                                out.println("Email");
                                out.println("</th>");
                                out.println("<th>");
                                out.println("<th>");
                                out.println("Mot de passe");
                                out.println("</th>");
                                out.println("Téléphone");
                                out.println("</th>");
                                out.println("<th>");
                                out.println("<th>");
                                out.println("Age");
                                out.println("</th>");
                                out.println("Suppression");
                                out.println("</th>");
                                out.println("<th>");
                                out.println("Modification");
                                out.println("</th>");
                                

                                out.println("</tr>");
                                for (int i = 0; i < listclients.size(); i++) {
                                    out.println("<tr>");
                                    out.println("<td>");
                                    out.println(listclients.get(i).getId());
                                    out.println("</td>");
                                    out.println("<td>");
                                    out.println(listclients.get(i).getPrenom());
                                    out.println("</td>");
                                    out.println("<td>");
                                    out.println(listclients.get(i).getNom());
                                    out.println("</td>");
                                    out.println("<td>");
                                    out.println(listclients.get(i).getEmail());
                                    out.println("</td>");
                                    out.println("<td>");
                                    out.println(listclients.get(i).getPassword());
                                    out.println("</td>");
                                    out.println("<td>");
                                    out.println(listclients.get(i).getPhone());
                                    out.println("</td>");
                                    long numclient= listclients.get(i).getId();
                                    out.println("<td>");
                                    out.println("<a href=\"/store?action=supprimerC&idclientS=" + numclient + "\">supprimer</a>");
                                    out.println("</td>");
                                    out.println("<td>");
                                    out.println("<a href=\"/store?action=editer&idclientsU=" + numclient + "\">modifier</a>");
                                    out.println("</td>");
                                    out.println("</tr>");
                                }
                                out.println("</table>");
                            }
                            // else out.println("listequestionvide");
%>

</form>
</div>


  <!-- end of sidebar -->
  <div class="cleaner"></div>
<div id="content_wrapper_bottom"></div>
<!-- end of content_wrapper -->
<div id="footer">
  <ul class="footer_menu">
    <li>Soumare</li>
    <li>Ndour</li>
    <li>Jabri</li>
    <li>Chenider</li>
  </ul>
</div>
<!-- end of footer -->

</body>
</html>

</html>
